(function(){
	function exportString(object){
		function format(n){
			var s='';
			for(;n;n--){
				s+='    ';
			}
			return s;
		}
		function x2s(o,f){
			var x='',arr=[],i,j,k='',v='',sp1=format(f),sp2=format(f+1);
			switch(typeof(o)){
				case 'undefined':
					return o;
				case 'boolean':
					return o;
				case 'number':
					return o;
				case 'string':
					return '"'+o+'"';
				case 'object':
					switch(o.constructor){
						case Array:
							x = '[\n';
							arr = [];
							for(i=0;i<o.length;i++){
								arr.push( x2s(o[i], f+1) );
							}
							x += sp2 + arr.join(',\n'+sp2) + '\n';
							x += sp1+']';
							return x;
						case Object:
							x = '{\n';
							arr = [];
							for(k in o){
								arr.push( '"'+k+'" : '+x2s(o[k], f+1) );
							}
							x += sp2 + arr.join(',\n'+sp2) + '\n';
							x += sp1+'}';
							return x;
						default:
							alert(['缺少对象',o.constructor]);
							return {};
					}
				default:
					alert(['缺少类型',typeof(o)]);
					return '';
			}
		}
		return x2s(object,0);
	}
	var xPath=function(xpath,contextNode,doc){doc=doc||document;contextNode=contextNode||doc;return doc.evaluate(xpath,contextNode,null,9,null).singleNodeValue;};
	var xPaths=function(xpath,contextNode,doc){doc=doc||document;contextNode=contextNode||doc;var N=new Array();var XPR=doc.evaluate(xpath,contextNode,null,7,null);for(var j=0;j<XPR.snapshotLength;j++){N.push(XPR.snapshotItem(j));}return N;};
	var DOM_ui = document.querySelector('body>ui');
	function get_DOM_obj(){
		var DOM_obj = {};
		DOM_obj[DOM_ui.nodeName] = {};
		DOM_obj[DOM_ui.nodeName].dom = DOM_ui;
		DOM_obj[DOM_ui.nodeName].list = {};
		function init_DOM_obj(obj, target){
			var j, k;
			for(var i = 0;i<target.children.length;i++){
				j = target.children[i];
				k = j.nodeName;
				obj[k] = {};
				obj[k].dom = j;
				obj[k].list = {};
				init_DOM_obj(obj[k].list, j);
			}
		}
		init_DOM_obj(DOM_obj[DOM_ui.nodeName].list, DOM_ui);
		return DOM_obj;
	}
	function show(s){
		
		var ele = document.querySelector('body>ui>ui_key_c>ui_status');
		function add(o, type){
			
		}
		switch(s){
			case s = "UI_XIEZI":
				add(ele, "SX");
				break;
			default:
				break;
		}
	}
	document.querySelector('body>ui>ui_key_c').onclick = function(e){
		var ele = e.target;
		var name = ele.nodeName;
		show("UI_XIEZI");
		console.log(name);
	};
})();